package idv.nightpig.lab05.action;

import idv.nightpig.lab05.protocol.Lab05ProtocolManager;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts2.interceptor.ServletRequestAware;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.Action;

public class ProtocolAction implements ServletRequestAware {

    private static final Logger LOGGER = LoggerFactory.getLogger(ProtocolAction.class);
    @Autowired
    private Lab05ProtocolManager lab05ProtocolManager;
    private HttpServletRequest servletRequest;

    public String execute() {
        LOGGER.info("{}", lab05ProtocolManager);
        return Action.SUCCESS;
    }

    public HttpServletRequest getServletRequest() {
        return servletRequest;
    }

    @Override
    public void setServletRequest(HttpServletRequest servletRequest) {
        this.servletRequest = servletRequest;
    }

}
